using OhioState.Math;

namespace OhioState.Graphics
{
    /// <summary>
    /// An interface for a bounding volume object.
    /// </summary>
    public interface IBoundingVolume
    {
        /// <summary>
        /// Get Centroid of the bounding volume
        /// </summary>
        Vector3 Centroid { get; }
        /// <summary>
        /// Check if the input point lies inside the bounding volume
        /// </summary>
        /// <param name="point">input point</param>
        /// <returns>true or false </returns>
        bool ContainsPoint(Vector3 point);
        /// <summary>
        /// Find the closest point to a target
        /// </summary>
        /// <param name="target">input vector</param>
        /// <returns>closest point</returns>
        Vector3 ClosestPoint(Vector3 target);
    }

    /// <summary>
    /// Represents an object that can be rendered.
    /// Has a bounding volume and a material.
    /// </summary>
    public interface IDrawable
    {
        /// <summary>
        /// Get the bounding volume.
        /// </summary>        
        IBoundingVolume BoundingVolume { get; }

        /// <summary>
        /// Get or set object's material.
        /// </summary>
        IMaterial Material { get; set; }

        /// <summary>
        /// Render the object to the specified render panel.
        /// </summary>
        /// <param name="panel">The render panel that object 
        /// should be rendered to.</param>
        void Render(IRenderPanel panel);
        //void Update(IRenderPanel panel);
    }
}
